CREATE PROCEDURE CoursesSearch
@CourseId VARCHAR(30) = '%',
@Name VARCHAR(100) = '%'
AS
BEGIN
DECLARE @SName VARCHAR(100) = '%'+@Name+'%';
DECLARE @Course VARCHAR(50) = '%'+@CourseId+'%';
SELECT 
	AutoId,
	CourseId,
	Name,
	Description,
	Credit,
	Prerequisite,
	Corequisite
FROM Course WHERE Name like @Sname AND CourseId like @Course;
END
